\version "2.14.0"  % necessary for upgrading to future LilyPond versions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% PAGE LAYOUT (SATB)
%%%% Compare differences in the \score code below with those of the
%%%% MELODY ONLY template. There aren't many.

\score {
  %% TRANPOSE FUNCTIONS: uncomment to enable (Maybe hook to the Web app?)
  %% \transpose c d
  <<
    \new ChordNames {
      \set chordChanges = ##t
      \psalmToneHarmonies
    }
    \new GrandStaff \with {
      \remove "System_start_delimiter_engraver"
    } 
    <<
      \new Staff
      <<
        \clef "treble"
        \new Voice = "sop" { \global \voiceOne \aSop }
        \new Voice = "alt" { \global \voiceTwo \aAlt }
      >>
      \new Lyrics
      \lyricsto sop \psalmToneLyric
      \new Staff
      <<
        \clef "bass"
        \new Voice = "ten" { \global \voiceOne \aTen }
        \new Voice = "bas" { \global \voiceTwo \aBas }
      >>
    >>
  >>
  \header {
  }
  \layout {
    system-count = #1  %% forces a single-system psalm tone
    \context { \Staff
      \remove "Time_signature_engraver"
      \override Rest #'transparent = ##t
      \override VerticalAxisGroup #'staff-staff-spacing = #'((basic-distance . 10) (minimum-distance . 10) (padding . 0)) %% forces equal spacing between staves
      \override StaffSpacing #'stem-spacing-correction = #-100
    }
    \context { \Score
      \remove "Bar_number_engraver"
      \override SpacingSpanner
        #'base-shortest-duration = #(ly:make-moment 1 2)
      \override SpacingSpanner
        #'common-shortest-duration = #(ly:make-moment 1 4)
      \override Rest #'transparent = ##t
    }
    \context { \Lyrics
      \consists "Separating_line_group_engraver"
      \override BarLine #'transparent = ##t
      \override LyricText #'font-family = #'normal
      \override LyricText #'font-size = #2.0
      \override LyricSpace #'minimum-distance = #0.6
      \override StanzaNumber #'font-family = #'normal 
      \override StanzaNumber #'font-series = #'normal 
      \override VerticalAxisGroup #'staff-affinity = #CENTER
      \override LyricText #'Y-offset = #-0.95
      \override LyricHyphen #'Y-offset = #-0.95
      \override StanzaNumber #'Y-offset = #-0.95
      \override LyricExtender #'Y-offset = #-0.95
      \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = #'((basic-distance . 0)
       (minimum-distance . 5.5)
       (padding . 0.5)
       (stretchability . 0))
    }
    \context { \ChordNames %% for guitar chords
      \override ChordName #'font-size = #0.5
      \override ChordName #'font-family = #'normal
      \override ChordName #'stencil = #centerCN 
      \override ChordName #'extra-offset = #'(0.75 . 0.0)
    } 
  }
}